Skip to content

fix: respect executablePath in standalone mode#320

Merged
AlexZeitler merged 1 commit intoPDMLab:masterfrom
cvetkovski98:fix/standalone-executable-path
Mar 11, 2026
Merged

fix: respect executablePath in standalone mode#320
AlexZeitler merged 1 commit intoPDMLab:masterfrom
cvetkovski98:fix/standalone-executable-path

Conversation

@cvetkovski98
Copy link

The docs and types both allow { standalone: true, executablePath: '/path/to/docker-compose' }, but the runtime condition executable?.standalone && !executable.executablePath causes this combination to fall into the non-standalone branch, which appends compose as a subcommand, producing an invalid command like /path/to/docker-compose compose up.

We hit this using testcontainers within a hermetic Bazel environment and a docker-compose binary managed by Bazel. The binary lives at a known absolute path (not on PATH), so standalone: true alone doesn't work, it only searches for docker-compose on PATH. Setting both standalone and executablePath seemed like the obvious solution based on the docs, but silently fell through to the wrong code path.

Added new unit tests verifying:

  • { standalone: true, executablePath } uses the custom path without compose
  • { standalone: true } defaults to docker-compose
  • { executablePath } (non-standalone) still appends compose (regression test for unchanged behavior)

@cvetkovski98 cvetkovski98 force-pushed the fix/standalone-executable-path branch from efdc1ca to 7e559de Compare March 11, 2026 15:06
@AlexZeitler AlexZeitler merged commit 265a2fb into PDMLab:master Mar 11, 2026
3 checks passed
@AlexZeitler
Copy link
Contributor

@cvetkovski98 Thanks for the PR - new version is available on npm.

@cvetkovski98
Copy link
Author

@AlexZeitler Thanks for the quick review and merge, appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants